import React,{Component} from 'react'
import {getObject} from '../../config/public'
// import {Link} from 'react-router'
class PlatformAnalysis extends Component {
	constructor(args) {
		super()
		this.state = {
			detailList : getObject(5)
		}
	}

	render(){
		return(
			<div className="row tab pad-t-20">
			        <div className="chart-box">
						<div className="my-chart" id="my-chart"></div>
					</div>
					<div className="row pad-t-20 clearFix">
						<div className="chart-box-1 floatL">
							<div className="my-chart" id="my-chart-1"></div>
						</div>
						<div className="chart-box-1 floatR">
							<div className="my-chart" id="my-chart-2"></div>
						</div>
					</div>
					<div className="table-div bg-FFFFFF box-shadow mar-t-20">
					    <table>
							<caption>用户详情</caption>
							<thead>
								<tr>
									<th>日期</th>
									<th>会员姓名</th>
									<th>会员等级</th>
									<th>所属公司</th>
									<th>登录时间</th>
									<th>退出时间</th>
								</tr>
							</thead>
							<tbody>
							{this.state.detailList.map((item,index)=>{
								return(
                                 <tr key={index}>
									<td>2017/06/15</td>
									<td>张伟</td>
									<td>等级</td>
									<td>华泰上海分公司</td>
									<td>2017/06/15 17:06:22</td>
									<td>2017/06/15 18:06:22</td>
								</tr>
									)
							})}
							</tbody>
							</table>
					</div>
			</div>
			)
	}
}
class VideoAnalysis extends Component {
	constructor(args) {
		super()
	}

	render(){
		return(
				<div className="row tab pad-t-20">
				2	
				</div>
			)
	}
}
class DataAnalysis extends Component {
	constructor(args) {
		super()
		this.state = {
			activeIndex : 0
		}
			
	}
	render() {

		return (
			<div className="container">
			     <div className="filter clearFix">
					<ul className="filter-ul nav clearFix">
						<li className={this.state.activeIndex===0?'active':''} onClick={()=>{this.setState({activeIndex:0})}}><a>用户平台分析</a></li>
						<li className={this.state.activeIndex===1?'active':''} onClick={()=>{this.setState({activeIndex:1})}}><a>视频点播分析</a></li>
					</ul>
				</div>
				    {this.state.activeIndex === 0 ?
				    	<PlatformAnalysis />
				    	:
				    	<VideoAnalysis />
				    }
				
				
			</div>

		)
	}

}
export default DataAnalysis

